#region License
// /* **************************************************************
// * Copyright (C) intex Consulting GmbH - All Rights Reserved    *
// *--------------------------------------------------------------*
// * Unauthorized copying of this file, via any medium is         *
// * strictly prohibited                                          *
// *--------------------------------------------------------------*
// * Proprietary and confidential                                 *
// *--------------------------------------------------------------*
// * Dissasembling/modifications strictly prohibited!             *
// ***************************************************************/
#endregion
using System;
using System.Diagnostics.CodeAnalysis;
using ComHlp.ContentClasses.VirtualControls.Buttons;
using ComHlp.enums;

namespace ComHlp.ContentClasses.FormDef
{
    [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")]
    public sealed class ItxFieldConstraint : ICloneable
    {
        public ItxConstraintType ConstraintType { get; set; }

        public string Undefined { get; set; }

        public char ReceivedType { get; private set; }

        public int TranslateNo { get; set; }

        public EItxButtonType ButtonType { get; set; }

        public int PreComa { get; set; }

        public int PostComa { get; set; }

        public ItxNumericPrefix Prefix { get; set; }

        public ItxAlignment Alignment { get; set; }

        public bool Protected { get; set; }

        /// <summary> constraint font size/thickness factor (W/D) </summary>
        public int FontFactor { get; set; }
        /// <summary> constraint font size/thickness factor (W/D) </summary>
        public ItxFontWeight FontWeight { get; set; }


        /// <summary> default constructor </summary>
        public ItxFieldConstraint(char pReceivedType)
        {
            Prefix = ItxNumericPrefix.None;
            Alignment = ItxAlignment.NotSet;
            Protected = false;
            PostComa = 0;
            PreComa = 0;
            ButtonType = EItxButtonType.NotSet;
            TranslateNo = 0;
            Undefined = "";
            ReceivedType = pReceivedType;
        }

        object ICloneable.Clone() { return Clone(); }

        public ItxFieldConstraint Clone()
        {
            ItxFieldConstraint fdConst = MemberwiseClone() as ItxFieldConstraint;
            return fdConst;
        }
    }
}